﻿<!DOCTYPE HTML>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>创始团队-公司认证-伯乐网</title>

    <link href="style/css/style.css" type="text/css" rel="stylesheet">
    <link href="style/css/external.min.css" type="text/css" rel="stylesheet">
    <link href="style/css/popup.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="style/js/jquery.1.10.1.min.js"></script>
    <script src="style/js/jquery.lib.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="style/js/ajaxfileupload.js"></script>
    <script src="style/js/additional-methods.js" type="text/javascript"></script>
    <!--layer.js-->
    <script type="text/javascript" src="style/js/layer/layer.js"></script>
</head>

<body>
<div id="body">
    <!--引入顶部导航栏-->
    <div th:replace="public/publicFragment::company_top_nav"></div>

    <div id="container">
        <div class="content_mid">
            <dl class="c_section c_section_mid">
                <dt>
                    <h2><em></em>填写公司信息</h2>
                    <a class="c_addjob" href="javascript:void(0)">&nbsp;</a>
                </dt>
                <dd>
                    <div class="c_text">展示强劲的创始团队，让求职者跟随而来吧！</div>
                    <img width="668" height="56" class="c_steps" alt="第三步" src="style/images/step3.png">

                    <form method="post" action="/saveFounder" id="memberForm" enctype="multipart/form-data">

                        <div id="memberDiv">
                            <div class="formWrapper">
                                <!--上传创始人头像-->
                                <div class="new_portrait">
                                    <input type="file" id="myfiles0" name="founderPhoto0" class="myfiles"
                                           allowexts="gif,jpeg,jpg,png,bmp" accept="image/*" value="">
                                    <img id="select_btn0" style="width:120px;height: 120px"
                                         src="style/images/upload_Photo.png"/>
                                    <script>
                                        //头像效果预览
                                        $(function () {
                                            $("#select_btn0").click(function () {
                                                $("#myfiles0").click();
                                            })
                                            $("#myfiles0").change(function (event) {
                                                var file = event.currentTarget.files[0];

                                                var reader = new FileReader();

                                                reader.onload = function (e) {
                                                    document.getElementById("select_btn0").src = e.target.result;
                                                }
                                                reader.readAsDataURL(file);
                                            })
                                        })
                                    </script>
                                </div>

                                <h3>创始人姓名</h3>
                                <input type="text" placeholder="请输入创始人姓名" name="founderName0" id="name0"
                                       class="s_input1 valid">

                                <h3>当前职位</h3>
                                <input type="text" placeholder="请输入当前职位，如：创始人兼CEO" name="founderPosition0"
                                       id="position0" class="s_input1 valid">

                                <h3>创始人简介</h3>
                                <textarea placeholder="请输入该创始人的个人履历等，建议按照时间倒序分条展示" maxlength="1000"
                                          name="founderDescribe0" id="description0"></textarea>
                            </div>
                        </div>
                        <a id="addMember" class="add_member" href="javascript:void(0)"><i></i>继续添加创始团队</a>
                        <script>
                            //点击继续添加创始人按钮
                            $("#addMember").click(function () {
                                var a = $(".formWrapper").length, b = $("#companyId").val();
                                2 == a && $(this).hide(), $("#memberDiv").append(
                                    '<div class="formWrapper">' +

                                        '<div class="new_portrait">' +
                                        '<input type="file" class="myfiles" id="myfiles' + a + '" name="founderPhoto' + a + '" allowexts="gif,jpeg,jpg,png,bmp" accept="image/*" value="">' +
                                        '<img id="select_btn' + a + '" style="width:120px;height: 120px" src="style/images/upload_Photo.png"/>' +
                                        '</div>' +

                                        "<h3>创始人姓名</h3>" +
                                        '<input type="text" class="s_input1" id="name' + a + '" name="founderName' + a + '" placeholder="请输入创始人姓名" />' +

                                        "<h3>当前职位</h3>" +
                                        '<input type="text" class="s_input1" id="position' + a + '" name="founderPosition' + a + '" placeholder="请输入当前职位，如：创始人兼CEO" />' +

                                        "<h3>创始人简介</h3>" + '<textarea class="s_textarea" id="description' + a + '" name="founderDescribe' + a + '" maxlength="1000" placeholder="请输入该创始人的个人履历等，建议按照时间倒序分条展示"></textarea>' +

                                        '<input type="button" class="btn_big" onclick="cancel(this)" value="取消" style="float:none;margin:0;font-size: 20px;height: 40px;line-height: 40px;width: 90px;padding: 0 20px;">'+

                                        '<script>' +
                                            '$("#select_btn' + a + '").click(function () {\n' +
                                            '$("#myfiles' + a + '").click();\n' +
                                            '\t\t\t\t\t\t\t\t})\n' +
                                            '\t\t\t\t\t\t\t\t$("#myfiles' + a + '").change(function (event) {\n' +
                                            '\t\t\t\t\t\t\t\t\tvar file = event.currentTarget.files[0];\n' +
                                            '\n' +
                                            '\t\t\t\t\t\t\t\t\tvar reader = new FileReader();\n' +
                                            '\n' +
                                            '\t\t\t\t\t\t\t\t\treader.onload = function (e) {\n' +
                                            '\t\t\t\t\t\t\t\t\t\tdocument.getElementById("select_btn' + a + '").src = e.target.result;\n' +
                                            '\t\t\t\t\t\t\t\t\t}\n' +
                                            '\t\t\t\t\t\t\t\t\treader.readAsDataURL(file);' +
                                            '});' +

                                            'function cancel(t){' +
                                                //删除当前节点的父节点
                                                'var node=$(t).parent().remove();'+
                                                //判断是否显示添加按钮
                                                'if($(".formWrapper").length<3){$("#addMember").attr("style","display: block")}'+
                                            '}'+
                                        "</" + "script>" +
                                    "</div>"),
                                    $(".formWrapper").each(function (b) {
                                        b != a && $(this).css({borderBottom: "1px solid #555", paddingBottom: "20px"})
                                    })
                            });
                        </script>

                        <div class="clear"></div>
                        <!--隐藏域存放当前公司id-->
                        <input type="hidden" id="companyId" name="companyId" th:value="${session.reg_companyInfo.id}">
                        <!--隐藏域存放创始人总人数，JS赋值-->
                        <input type="hidden" id="count" name="count" value="">
                        <!--隐藏域存放用户的id-->
                        <input type="hidden" id="userId" name="userId" th:value="${session.user.id}">
                        <input type="submit" value="保存，下一步" id="step3Submit" class="btn_big fr" hidden>
                        <input type="button" value="保存，下一步" id="hiddenSubmit" class="btn_big fr" >
                    </form>
                </dd>
            </dl>
        </div>

        <script src="style/js/step3.min.js" type="text/javascript"></script>
        <div class="clear"></div>
        <input type="hidden" value="52346c62232045a8ab1d45cb3e0540b7" id="resubmitToken">
        <a rel="nofollow" title="回到顶部" id="backtop" style="display: inline;"></a>
    </div>
    <!-- end #container -->
</div>
<!--引入页面底部备案号-->
<div th:replace="public/publicFragment::footer_nav"></div>

<script src="style/js/core.min.js" type="text/javascript"></script>
<script src="style/js/popup.min.js" type="text/javascript"></script>
</body>

</html>